import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.table.DefaultTableModel;

public class Main {
	public static void main(String[] argv) throws Exception {
		MyTable table = new MyTable();
		DefaultTableModel model = (DefaultTableModel) table.getModel();

		model.addColumn("A", new Object[] { "item1", "item3" });
		model.addColumn("B", new Object[] { "item2", "item4" });

		String[] values = new String[] { "1", "2", "3" };
		table.setComboCell(1, 1, new MyComboBoxEditor(values));

		// TableColumn col = table.getColumnModel().getColumn(0);
		// col.setCellEditor(new MyComboBoxEditor(values));
		// col.setCellEditor(new MyComboBoxRenderer(values));
		// table.setModel(model);
		// table.updateUI();
		JScrollPane jp = new JScrollPane(table);
		jp.setViewportView(table);
		jp.setSize(400, 300);
		JFrame jf = new JFrame();
		jf.getContentPane().add(jp);
		jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		jf.setSize(400, 300);
		jf.setVisible(true);

	}
}
